package com.eis.sap.in.connector.datatype;

import com.eis.thirdsys.connector.datatype.eissystype.MysqlDataType;
import com.eis.thirdsys.connector.datatype.eissystype.SqlLiteDataType;


public enum SapDataType {
	ACCP(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Posting period. The length for this data type is defined as 6 places. The format is YYYYMM. In input and output, a period is inserted between the year and month, that is the mask of this data type has the form ____.__.
	CHAR(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Character string. Fields of type CHAR may only have a maximum length of 255 in tables. If longer character strings are used in tables, use data type LCHR. There are no restrictions for the length of such fields in structures.
	CLNT(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Client. Client fields always have three places
	CUKY(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Currency key. Fields of this type are referenced by fields of type CURR. The length is defined as 5 places for this data type.
	CURR(SqlLiteDataType.DOUBLE, MysqlDataType.DOUBLE), // Currency field. Corresponds to an amount field DEC. A field of this type must refer to a field of type CUKY (reference field).
	DATS(SqlLiteDataType.INT, MysqlDataType.INT), // Date. The length is defined as 8 places for this data type. The output mask can be defined with the user profile.
	DEC(SqlLiteDataType.DOUBLE, MysqlDataType.DOUBLE), // Counter or amount field with decimal point, sign and comma for thousands. A DEC field may have a maximum of 31 places.
	FLTP(SqlLiteDataType.DOUBLE, MysqlDataType.DOUBLE), // Floating point number. The length (including decimal places) is defined as 16 places for this data type.
	INT1(SqlLiteDataType.INT, MysqlDataType.TINYINT), // 1-byte integer, value range from 0 to 255. The length is defined as 3 places for this data type.
	INT2(SqlLiteDataType.INT, MysqlDataType.SMALLINT), // 2-byte integer, value range from -32767 to 32767. Fields of this type should only be used as length fields. Such length fields are directly in front of the length field (type LCHR, LRAW). If there is an INSERT or UPDATE of the length field, the database interface enters the length actually used in the length field. The length is defined as 5 places for this data type.
	INT4(SqlLiteDataType.INT, MysqlDataType.INT), // 4-byte integer, value range from 2177483647 to 2177483647. The length of this data type is defined as 10 places.
	LANG(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Language key. Has its own field format for special functions. The language key is displayed with two places at the user interface, but is stored with one place on the database. The conversion exit ISOLA converts the value to be displayed on the user interface to that of the database and vice versa. This conversion exit is automatically assigned to a domain with data type LANG during activation.
	LCHR(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Any character string with at least 256 characters. Fields of this type must be at the end for transparent tables and have a preceding length field of type INT2. For an INSERT or UPDATE in ABAP programs, this length field must be filled with the length actually required. Fields of this type cannot be used in the WHERE condition of a SELECT statement.
	LRAW(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Any uninterpreted string of bytes at least 256 places in length. Fields of this type must be at the end for transparent tables and have a preceding length field of type INT2. For an INSERT or UPDATE in ABAP programs, this length field must be filled with the length actually required.
	NUMC(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Character string that may only contain digits. The length of a field of this type is limited to a maximum of 255 places.
	PREC(SqlLiteDataType.INT, MysqlDataType.SMALLINT), // Precision of a QUAN field. The length is defined as 2 places for this data type.
	QUAN(SqlLiteDataType.DOUBLE, MysqlDataType.DOUBLE), // Quantity. Corresponds to an amount field DEC. A field of this type must always refer to a units field with format UNIT (reference field).
	RAW(SqlLiteDataType.NVARCHAR, MysqlDataType.MEDIUMBLOB), // Uninterpreted byte string. Fields of type RAW may only have a maximum length of 255 in tables. If longer Raw fields are used in tables, you must choose data type LRAW. This length restriction is not valid for structures.
	RAWSTRING(SqlLiteDataType.NVARCHAR, MysqlDataType.MEDIUMBLOB), // Uninterpreted byte sequence of variable length. In the Dictionary, you can specify a length (minimum 256 characters) for this type. This data type can be used in types (data elements, structures, table types) and domains. Binary data of the type RAWSTRING can be stored in the database. However, there are limitations here that are described in the explanations given for the ABAP keyword STRING. String fields cannot be used in table keys, in indices, or in the WHERE condition of a SELECT statement. In ABAP, the Dictionary type RAWSTRING is mapped onto the ABAP type XSTRING, which is used as a reference to a memory area of variable size.
	SSTRING(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Short character sequence of variable length. In the Dictionary, you can specify a length (1-255 characters) for this type. Usage in database tables is possible. Note here the explanations given for the ABAP keyword STRING. String fields of this type can be used in indices and in the WHERE condition of a SELECT statement. They cannot be used in the key for tables. In ABAP, the Dictionary type SSTRING is mapped onto the ABAP type STRING, which is used as a reference to a memory area of variable size.
	STRING(SqlLiteDataType.NVARCHAR, MysqlDataType.TEXT), // Character sequence of variable length. In the Dictionary, you can specify a length (minimum 256 characters) for this type. Usage in database tables is also possible. However, there are limitations and these are described in the explanations given for the ABAP keyword STRING. String fields cannot be used in the key for tables, in indices, or in the WHERE condition of a SELECT statement. In ABAP, the Dictionary type STRING is mapped onto the ABAP type STRING, which is used as a reference to a memory area of variable size.
	TIMS(SqlLiteDataType.INT, MysqlDataType.MEDIUMINT), // Time. The length is defined as 6 places for this data type. The format is hhmmss. The mask for input and output has the form __.__.__.
	UNIT(SqlLiteDataType.VARCHAR, MysqlDataType.VARCHAR), // Units key. Fields of this type are referenced by fields of type QUAN. The length of this data type is defined as 2 or 3 places.
	VARC(SqlLiteDataType.NVARCHAR, MysqlDataType.TEXT), // Character string of variable length. Creating fields of this data type is no longer supported as of Release 3.0, but existing fields with this data type can still be used. Fields of this type cannot be used in the WHERE condition of a SELECT statement.
	;
	
	private SapDataType(SqlLiteDataType sqlLiteDataType, MysqlDataType mysqlDataType) {
		this.sqlLiteDataType = sqlLiteDataType;
		this.mysqlDataType = mysqlDataType;
	}
	
	private SqlLiteDataType sqlLiteDataType;
	private MysqlDataType mysqlDataType;
	public SqlLiteDataType getSqlLiteDataType() {
		return sqlLiteDataType;
	}
	public MysqlDataType getMysqlDataType() {
		return mysqlDataType;
	}

	
}
